Current Location: Home> Function Categories> expm1

expm1

Returns exp(number) - 1, and can calculate the exact result even when the value of number is close to zero.
Name:expm1
Category:math
Programming Language:php
One-line Description:Returns the value of -1 to the power of E.

Definition and usage

expm1() function returns exp(x) - 1, and can calculate the exact result even when the value of number is close to zero.

Example

In this example, we will apply the expm1() function to different numbers:

 <?php
echo ( expm1 ( 1 ) ) ;
echo ( expm1 ( - 1 ) ) ;
echo ( expm1 ( 5 ) ) ;
echo ( expm1 ( 10 ) )
?>

Try it yourself

grammar

 expm1 ( x )
parameter describe
x Required. A number.

illustrate

expm1() returns 'exp(x) - 1', and the accurate result can be calculated even when the value of x is close to zero. But when two values ​​approach equal, 'exp (x) - 1' becomes inaccurate.

Similar Functions
  • Calculate the index of e exp

    exp

    Calculatetheindexofe
  • Antihyperbolic cosine acosh

    acosh

    Antihyperboliccosine
  • Calculate the oblique length of a straight triangle hypot

    hypot

    Calculatetheobliquel
  • Find the minimum value min

    min

    Findtheminimumvalue
  • Reverse cosine acos

    acos

    Reversecosine
  • Convert decimal to octal decoct

    decoct

    Convertdecimaltoocta
  • Round the division result intdiv

    intdiv

    Roundthedivisionresu
  • Display the maximum possible value of a random number mt_getrandmax

    mt_getrandmax

    Displaythemaximumpos